package cn.com.shopec.erp.multiChannel.entity;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * 多渠道订单商品实体类
 * @author Terry
 *
 */
@Entity
@Table(name = "tbl_channel_order_item")
public class ChannelOrderItem {
	private String id;					//多渠道订单商品编号
	private String channelOrderId;		//多渠道订单编号
	private String skuId;				//SKU ID
	private String skuName;				//SKU名称
	private Double itemPrice;			//商品价格
	private Double itemTotal;			//商品数量
	private String itemNum;				//多渠道外部商品编号，对应商家后台货号

	public ChannelOrderItem() {
	}

	public ChannelOrderItem(String id) {
		this.id = id;
	}

	public ChannelOrderItem(String id, String channelOrderId, String skuId, String skuName,
			Double itemPrice, Double itemTotal) {
		this.id = id;
		this.channelOrderId = channelOrderId;
		this.skuId = skuId;
		this.skuName = skuName;
		this.itemPrice = itemPrice;
		this.itemTotal = itemTotal;
	}

	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@GeneratedValue(generator = "generator")
	@Id
	@Column(name = "id", unique = true, nullable = false, length = 32)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column( name="channel_order_id",length = 30)
	public String getChannelOrderId() {
		return this.channelOrderId;
	}

	public void setChannelOrderId(String channelOrderId) {
		this.channelOrderId = channelOrderId;
	}

	@Column(name = "sku_id", length = 30)
	public String getSkuId() {
		return this.skuId;
	}

	public void setSkuId(String skuId) {
		this.skuId = skuId;
	}

	@Column(name = "sku_name", length = 50)
	public String getSkuName() {
		return this.skuName;
	}

	public void setSkuName(String skuName) {
		this.skuName = skuName;
	}

	@Column(name = "item_price", precision = 20)
	public Double getItemPrice() {
		return this.itemPrice;
	}

	public void setItemPrice(Double itemPrice) {
		this.itemPrice = itemPrice;
	}

	@Column(name = "item_total", precision = 20, scale = 0)
	public Double getItemTotal() {
		return this.itemTotal;
	}

	public void setItemTotal(Double itemTotal) {
		this.itemTotal = itemTotal;
	}

	@Column(name = "item_num", length = 30)
	public String getItemNum() {
		return itemNum;
	}

	public void setItemNum(String itemNum) {
		this.itemNum = itemNum;
	}
	
}
